import request from '@/utils/request'

export function deviceList() {
  return request({
    url: '/device/list',
    method: 'get'
  })
}

export function showDeviceList(query) {
  return request({
    url: '/device/show',
    method: 'get',
    params: query
  })
}

export function saveOrUpdateDevice(data) {
  return request({
    url: '/device/save',
    method: 'post',
    data
  })
}

export function deleteDevice(deviceId) {
  return request({
    url: '/device/remove',
    method: 'get',
    params: { 'deviceId': deviceId }
  })
}

export function stopDevice(deviceId) {
  return request({
    url: '/device/stop',
    method: 'get',
    params: { 'deviceId': deviceId }
  })
}
